

SUBDIR=$(shell find . -maxdepth 1 -type d)
DIRS:=$(basename $(patsubst ./%,%,$(SUBDIR)))

.PHONY: $(DIRS) clean

all: $(DIRS)

test:
	echo $(DIRS)

$(DIRS):
	@for dir in $(DIRS); do \
		$(MAKE) -C $$dir || exit $$?; \
	done

clean:
	@for dir in $(DIRS); do \
		$(MAKE) -C $$dir clean || exit $$?; \
	done
